import rxAjax from '@/assets/js/ajax.js';

//印章授权管理 api接口
export const FormStampAuthApi = {};

FormStampAuthApi.baseUrl= '/api-form/form/core/formStampAuth';
FormStampAuthApi.exportUrl= FormStampAuthApi.baseUrl + '/listExport';

//查询列表
FormStampAuthApi.query=function (parameter) {
  var url= FormStampAuthApi.baseUrl + '/query';
  return rxAjax.postJson(url,parameter).then (res => {
    return res.result
  })
}

/**
* 获取单记录
* @param pkId
* @returns {*}
*/
FormStampAuthApi.getPermissionByObjectId =function(objectId) {
  var url= FormStampAuthApi.baseUrl + '/getPermissionByObjectId?objectId=' + objectId;
  return rxAjax.get(url);
}

//保存数据
FormStampAuthApi.savePermission =function(parameter) {
  var url= FormStampAuthApi.baseUrl + '/savePermission';
  return rxAjax.postJson(url,parameter);
}

//删除数据
FormStampAuthApi.del =function(parameter) {
  var url= FormStampAuthApi.baseUrl + '/del';
  return rxAjax.postUrl(url,parameter);
}

export  default FormStampAuthApi;

